<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .d1{
        
            color: red;
            
            font-size: 32px;
        }
        /* 标签选择器与类选择器组合使用,匹配;类型为 d1的div */
        div.d1{  /*只在div能用*/
            width: 200px;
            height: 200px;
            background-color: green;
        }
        
        .d2{
            background-color: orange;
        }
    </style>
</head>

<body>
    <p class="d1">p段落</p>
    <div class="d1">div</div>
    <br>
    <span class="d1 d2">span</span>
    
</body>
</html>